package org.bird.jvm;

import java.util.ArrayList;
import java.util.List;

/**
 * @Described：堆内存溢出探究
 * @VM args : -Xms5M -Xmx5M -Xmn3M -XX:PermSize=10M -XX:MaxPermSize=10M -XX:+PrintGCDetails -XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError
 * @author liangjf
 *
 */
public class HeapOutOfMemory {

	static class OOMObject {

	}

	public static void main(String[] args) {
		List<OOMObject> list = new ArrayList<OOMObject>();
		while (true) {
			list.add(new OOMObject());
		}
	}
}
